import request from '@/utils/request'

const Api = {
  backUp: '/frontend/Backups/backup',
  tableFinds: '/frontend/Backup/societyFinds',
  tableEdit: '/frontend/Backup/delete',
  bacDownload: '/frontend/backup/bacDownload'
}

export function backUp (parameter) {
  return request({
    url: Api.backUp,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
export function tableFinds (parameter) {
  return request({
    url: Api.tableFinds,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
export function tableEdit (parameter) {
  return request({
    url: Api.tableEdit,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
export function bacDownload (parameter) {
  return request({
    url: Api.bacDownload,
    method: 'post',
    data: parameter,
    responseType: 'blob',
    headers: { 'Content-Type': 'application/json; application/octet-stream' }
    // headers: {
    //   'Content-Type': 'application/json;charset=UTF-8'
    // }
  })
}
